﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Add.aspx.cs" Inherits="IYAKASAPortal.Add" ValidateRequest="false" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title></title>
    <link rel="stylesheet" href="../support/tfNiceTable/tfNiceTable.css" />
        <style type="text/css">
        label.error{
            color:red;
        }
    </style>
    <script type="text/javascript" src="../support/tfNiceTable/tfNiceTable.js"></script>
</head>
<body>
    <form id="form1" runat="server">
        <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
            <ContentTemplate>
                <table border="0" width="100%" cellpadding="0" cellspacing="0" style="height: 25px; table-layout: fixed">
                    <tr>
                        <td class="main_title_left"></td>
                        <td class="main_title_center" style="text-align: left">&nbsp;成都弥荣科技发展有限公司--用户添加页面</td>
                        <td class="main_title_right"></td>
                    </tr>
                </table>
                <table width="100%" cellpadding="0" cellspacing="0" border="0" class="mainWidth">
                    <tr>
                        <td>
                            <div class="container">
                                <table class="tfNiceTable" cellpadding="3" cellspacing="0">
                                    <thead>
                                        <tr class="tfNiceTable_head_style">
                                            <td colspan="2" align="left">
                                                <asp:Label runat="server" ID="txtTitle"></asp:Label>
                                            </td>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        <tr>
                                            <td align="right" style="width: 45%; padding-right: 5px">员工编号</td>
                                            <td align="left" style="padding-left: 5px">
                                                <asp:TextBox ID="txtENo" runat="server" AutoPostBack="True"></asp:TextBox>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td align="right" style="padding-right: 5px">员工账户</td>
                                            <td align="left" style="padding-left: 5px">
                                                <asp:TextBox ID="txtEId" runat="server"></asp:TextBox>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td align="right" style="padding-right: 5px">设置密码</td>
                                            <td align="left" style="padding-left: 5px">
                                                <asp:TextBox ID="txtEPwd" runat="server" TextMode="Password"></asp:TextBox>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td align="right" style="padding-right: 5px">确认密码</td>
                                            <td align="left" style="padding-left: 5px">
                                                <asp:TextBox ID="txtEPwdC" runat="server" TextMode="Password"></asp:TextBox>
                                                <%--<asp:CompareValidator ID="CompareValidator1" runat="server" ControlToCompare="txtEPwd" ControlToValidate="txtEPwdC" ErrorMessage="两次输入的密码不一致" ForeColor="Red"></asp:CompareValidator>--%>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td align="right" style="padding-right: 5px">员工权限</td>
                                            <td align="left" style="padding-left: 5px">
                                                <asp:DropDownList ID="drpEPower" runat="server">
                                                    <asp:ListItem Value="0">厂家人员</asp:ListItem>
                                                    <asp:ListItem Value="1">监督部门</asp:ListItem>
                                                    <asp:ListItem Value="2">站长</asp:ListItem>
                                                    <asp:ListItem Value="3">管理员</asp:ListItem>
                                                    <asp:ListItem Value="4">设备管理员</asp:ListItem>
                                                    <asp:ListItem Value="5">操作员</asp:ListItem>
                                                    <asp:ListItem Value="6">无权限</asp:ListItem>
                                                </asp:DropDownList>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td align="right" style="padding-right: 5px">员工岗位</td>
                                            <td align="left" style="padding-left: 5px" >
                                                <asp:CheckBoxList ID="chbELicense" runat="server" AppendDataBoundItems="True" RepeatDirection="Horizontal" RepeatColumns="4" CssClass="table_without_border">
                                                </asp:CheckBoxList>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td align="right" style="padding-right: 5px">员工姓名</td>
                                            <td align="left" style="padding-left: 5px">
                                                <asp:TextBox ID="txtEName" runat="server"></asp:TextBox>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td colspan="2" align="center">
                                                <asp:Button ID="btnSaveImg" CssClass="btnSaveEnabled" runat="server" OnClick="btnSaveImg_Click" />
                                                <asp:Button ID="btnCancel" runat="server" Text="" CssClass="btnBackEnabled" OnClick="btnCancel_Click" />
                                            </td>
                                        </tr>
                                    </tbody>
                                </table>
                            </div>
                        </td>
                    </tr>
            </ContentTemplate>
        </asp:UpdatePanel>
    </form>
</body>
</html>
<script type="text/javascript" src="../script/jquery-3.2.1.min.js"></script>
<script type="text/javascript" src="../script/jquery.validate.min.js"></script>
<script type="text/javascript">
    $(function () {
        $("#form1").validate({
            onfocusout:function(element){
                $(element).valid();
            },
            rules: {
                "txtENo": {
                    required: true
                },
                "txtEId": {
                    required: true
                },
                "txtEPwd": {
                    required: true
                },
                "txtEPwdC": {
                    required: true,
                    equalTo: "#txtEPwd"
                },
                "txtEName": {
                    required: true
                }
            },
            messages: {
                "txtENo": {
                    required: "员工编号不能为空!"
                },
                "txtEId": {
                    required: "员工账户不能为空"
                },
                "txtEPwd": {
                    required: "密码不能为空"
                },
                "txtEPwdC": {
                    required: "请输入确认密码",
                    equalTo: "密码不一致!请重新输入"
                },
                "txtEName": {
                    required: "员工姓名不能为空"
                }
            }
        });
    });
    
</script>